<div class="dux-tip am-cf">
    <div class="tip-body">
        <h1>订单已提交，请您进行支付！</h1>
        <p>应付金额: <span class="am-text-danger">￥{$totalPrice}</span>元 (含运费<span
                class="am-text-danger">{$deliveryPrice}</span>元)
            <!--loop{$currency as $vo}-->
            <!--if{$vo.type}-->
            + ( <span class="am-text-danger">{$vo.money}</span> 元 / <span class="am-text-danger">{$vo.amount}</span> {$vo.name} )
            <!--{else}-->
            + <span class="am-text-danger">{$vo.amount}</span> {$vo.name}
            <!--{/if}-->

            <!--{/if}-->
        </p>
    </div>
</div>
<!--if{$currencyList}-->
<div class="dux-box dux-pay-body">
    <div class="box-header">
        其他货币支付方式
    </div>
    <div class="dux-pay-type am-cf">
        <!--loop{$currencyList as $key => $vo}-->
        <label class="active">
            <input type="checkbox" name="currency" value="{$key}" checked>
            {$vo.name}支付 (余额 {$vo.amount} {$vo.unit})
        </label>
        <!--{/loop}-->
    </div>
</div>
<!--{/if}-->

<div class="dux-box dux-pay-body">
    <div class="box-header">
        请选择支付方式并付款
    </div>
    <div class="dux-pay-type am-cf">
        <!--if{$orderConfig.amount_status}-->
        <label class="active">
            <input type="radio" name="type" value="" > 账户支付 (余额{$userInfo.money}元)
        </label>
        <!--{/if}-->
        <?php $i = 0; ?>
        <!--loop{$payList as $type => $vo}-->
        <!--if{$vo.platform == 'mobile'}-->
        <?php $i++; ?>
        <label>
            <input type="radio" name="type" value="{$type}" <!--if{$i == 1}--> checked <!--{/if}-->> {$vo.name}
        </label>
        <!--{/if}-->
        <!--{/loop}-->
    </div>
</div>
<div class="am-padding">
    <div class="am-btn am-btn-danger am-btn-block" id="pay">确认订单，立即支付</div>
</div>
<script>
    var orderNo = '{$orderNo}';
    Do('base', 'dialog', function () {
        $('#pay').click(function () {

            var currency = [];
            $("input[name='currency']:checked").each(function(){
                currency.push($(this).val());
            });

            app.ajax({
                url: '{url()}',
                type: 'post',
                data: {
                    currency : currency,
                    type: $('input[name="type"]:checked').val(),
                    order_no: orderNo
                },
                success: function (msg, url) {
                    window.location.href = url;
                },
                error: function (msg) {
                    app.error(msg);
                }
            });
        });
    });
</script>